/*
 * SPTabComponent.java
 *
 * Created on 9 de marzo de 2007, 20:22
 */

package org.pvs.superpalitos.gui;

import javax.swing.ImageIcon;

/**
 *
 * @author  angel
 */
public class SPTabComponent extends javax.swing.JPanel {
  
  /**
	 * 
	 */
	private static final long serialVersionUID = 3661600911878981508L;
	/** Creates new form SPTabComponent */
  public SPTabComponent(String title, ImageIcon icon) {
  	setOpaque(false);
    initComponents();
    titleLabel.setText(title);
    titleLabel.setIcon(icon);
    closeButton.setIcon(SPFrame.II_CLOSE_16);
  }
  
  /** This method is called from within the constructor to
   * initialize the form.
   * WARNING: Do NOT modify this code. The content of this method is
   * always regenerated by the Form Editor.
   */
  // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents
  private void initComponents() {

    closeButton = new javax.swing.JButton();
    titleLabel = new javax.swing.JLabel();

    closeButton.setText("x");
    closeButton.setOpaque(false);

    titleLabel.setText("asdfasdf:");

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
    this.setLayout(layout);
    layout.setHorizontalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
        .addComponent(titleLabel)
        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 54, Short.MAX_VALUE)
        .addComponent(closeButton, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE))
    );
    layout.setVerticalGroup(
      layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
      .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
        .addComponent(closeButton, javax.swing.GroupLayout.PREFERRED_SIZE, 16, javax.swing.GroupLayout.PREFERRED_SIZE)
        .addComponent(titleLabel))
    );
  }// </editor-fold>//GEN-END:initComponents
  
  
  // Variables declaration - do not modify//GEN-BEGIN:variables
  private javax.swing.JButton closeButton;
  private javax.swing.JLabel titleLabel;
  // End of variables declaration//GEN-END:variables
  
}
